#!/usr/bin/env python
# -*- coding: UTF-8 -*-

from timelogic import Task

class TaskManager:
    def __init__(self, data):
        #todo: get default from the parser
        #just create a dummy object for now
        self.task = Task('Default')
    def run(self):
        self.task.start()
    def halt(self):
        self.task.stop()
    def taskInfo(self):
        (h, m) = self.task.getperiod()
        return "%s - %d:%02d" % (self.task.name, h, m)
    def switchTask(self):
        pass
